package Object_3;

public class Test {
    public static void main(String[] args) {
//        Animal animal = new Cat("小猫");
//        System.out.println(animal.getName());
//        IRunning iRunning = new Cat("小猫");
//        iRunning.run();
        Cat cat = new Cat("小猫");
        System.out.println(cat.getName());
        cat.run();

        Fish fish = new Fish("小鱼");
        System.out.println(fish.getName());
        fish.swim();

        Duck duck = new Duck("小鸭只");
        duck.fly();
        duck.run();
        duck.swim();

    }
}
